package com.ziytek.web.citizen.config;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Service;

/**
 * 历史数据库文件配置
 * @author fenghx
 */
@Slf4j
@Service
@RefreshScope
public class HistoryDbNameConfig {

    @Value("${historyDbName}")
    private String dbName;

    public boolean nameNotNull(){
        return StringUtils.isNotBlank(dbName);
    }

    public String getHistoryDbName() {
        log.info("获取历史数据库文件HistoryDbNameConfig dbName:{}", dbName);
        return dbName;
    }
}
